package kr.co.hk;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import android.widget.AdapterView.OnItemClickListener;

public class List extends Activity {
	
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.main1);	
		//String[] listItem = getResources().getStringArray(R.array.searchFacCl);
		ListView listView = (ListView) findViewById(R.id.listView);
		//ArrayAdapter<String> arrayAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, listItem);
		ArrayAdapter adapter = ArrayAdapter.createFromResource(this, R.array.searchFacCl, android.R.layout.simple_list_item_1);
		listView.setAdapter(adapter);
		//listView.setTextFilterEnabled(true);
		
		listView.setOnItemClickListener(new OnItemClickListener() {
		Bundle extra = getIntent().getExtras();
		int no = extra.getInt("no");
		
			@Override
			public void onItemClick(AdapterView<?> arg0, View arg1, int arg2,
					long arg3) {
				
					
					Intent intent = new Intent(List.this, Detail.class);			
					intent.putExtra("no", no);
					intent.putExtra("bun", arg2);
					startActivity(intent);
					
			}
		});
	}
	
}
